package cn.ljw.mapper;

import cn.ljw.entity.ArticleTag;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author 一朝风月
 * @date 2024/3/27 21:25
 * @Code 面向注解面向卿，终无解释再无你
 * @description
 */
public interface ArticleTagMapper extends BaseMapper<ArticleTag> {
    //文章点击数
    @Update("update article set hits = hits + #{increaseHits} where id = #{id} and deleted = 0")
    int increaseHits(@Param("id") Integer id, @Param("increaseHits") Integer increaseHits);
}
